5 "require adblock-fast.status as adb";
9 return baseclass.extend({
10 title: _("AdBlock-Fast"),
13 return Promise.all([adb.getInitStatus(pkg.Name)]);
16 render: function (data) {
18 status: (data[0] && data[0][pkg.Name]) || {
25 force_dns_active: null,
32 outputFileExists: null,
33 outputCacheExists: null,
34 outputGzipExists: null,
39 statusNoInstall: _("%s is not installed or not found").format(pkg.Name),
40 statusStopped: _("Stopped"),
41 statusStarting: _("Starting"),
42 statusProcessing: _("Processing lists"),
43 statusRestarting: _("Restarting"),
44 statusForceReloading: _("Force Reloading"),
45 statusDownloading: _("Downloading lists"),
46 statusError: _("Error"),
47 statusWarning: _("Warning"),
48 statusFail: _("Fail"),
49 statusSuccess: _("Active"),
53 if (reply.status.outputCacheExists) {
54 cacheText = _("Cache file");
55 } else if (reply.status.outputGzipExists) {
56 cacheText = _("Compressed cache");
58 var forceDnsText = "";
59 if (reply.status.force_dns_active) {
60 reply.status.force_dns_ports.forEach((element) => {
61 forceDnsText += element + " ";
69 { class: "table", id: "adblock-fast_status_table" },
71 E("tr", { class: "tr table-titles" }, [
72 E("th", { class: "th" }, _("Status")),
73 E("th", { class: "th" }, _("Version")),
74 E("th", { class: "th" }, _("DNS Service")),
75 E("th", { class: "th" }, _("Blocked Domains")),
76 E("th", { class: "th" }, _("Cache")),
77 E("th", { class: "th" }, _("Force DNS Ports")),
79 E("tr", { class: "tr" }, [
83 statusTable[reply.status.status] || _("Unknown")
85 E("td", { class: "td" }, reply.status.version || _("-")),
86 E("td", { class: "td" }, reply.status.dns || _("-")),
87 E("td", { class: "td" }, reply.status.entries || _("-")),
88 E("td", { class: "td" }, cacheText || _("-")),
89 E("td", { class: "td" }, forceDnsText || _("-")),